<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="org.limp.mine.DateTrimmer"%>
<%@ page import="org.limp.mine.StringTool"%>
<%@ page import="jt.classic.app.info.AInfo" %>
<%@ page import="jt.classic.system.ISystem" %>
<%@ page import="jt.classic.system.user.IUser" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%
   String context = jt.classic.system.ISystem.getContextPath();
   
   IUser user = ISystem.getSessionUser(request);
   
   AInfo info = (AInfo)request.getAttribute("info");
   
   List list = (List)request.getAttribute("list");
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><%=info.ititle()%></title>
</head>
<jsp:include page="../head.jsp"></jsp:include>
<script>
   var sel;
   function handleSelect(s){
      sel = s;
      if(s == "lanmu"){
         var url = context + "/app/info.do?method=directorytree&select=true";
         dialog(url,true,"选择所属栏目",300,350);
      }else if(s == "fanwei"){
         var url = context + "/system/tree.do?method=selectgroupall&type=checkbox";
         dialog(url,true,"选择发布范围",300,350);
      }
   }
   
   function responseResult(ids,names,types){
      if(sel == "lanmu"){
         document.form1.idid.value = ids.substring(1);
         document.form1.idname.value = names;
      }else if(sel == "fanwei"){
      }
      
      closeDialog();
   }
   
   function handleSumbit(){
       if(isblank(document.form1.iftitle)){
          alert("请填写标题");
       }else if(confirm("确定提交")){
          document.form1.action = context + "/app/info.do?method=saveinfo";
          document.form1.submit();
       }
   }
</script>
<body>
<form name="form1" method="post" action="">
<input type="hidden" name="ifuserid" value="<%=user.id()%>">
<input type="hidden" name="ifusername" value="<%=user.iname()%>">
<input type="hidden" name="ifdate" value="<%=DateTrimmer.getYMDHMS()%>">
<table width="99%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left"> 
    	<img src="<%=context%>/app/images/arrow.gif" width="16" height="16">公共事务 ->> <%=info.itype()%>
    </td>
  </tr>  
</table>
<br>
<table width="98%" class="tab" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td colspan="2" align="right"><a href="javascript:void(0);" onclick="javascript:void(-1);" onclick="javascript:doPrint();">打印</a></td>
  </tr>
  <tr>
    <td width="15%" bgcolor="#A7CADE">&nbsp;主题</td>
    <td width="75%">&nbsp;<%=info.ititle()%></td>
  </tr>
  <tr>
    <td bgcolor="#A7CADE">&nbsp;发布范围</td>
    <td>&nbsp;<%=info.issue()!=null?info.issue().iareaname():""%></td>
  </tr>
  <tr>
    <td bgcolor="#A7CADE">&nbsp;发布人</td>
    <td>&nbsp;<%=info.iuser().iname()%></td>
  </tr>
  <tr>
    <td bgcolor="#A7CADE">&nbsp;发布日期</td>
    <td>&nbsp;<%=DateTrimmer.getYMDHMS_LBL(info.idate())%></td>
  </tr>
  <tr>
    <td bgcolor="#A7CADE">&nbsp;是否回执</td>
    <td>&nbsp;<%=info.ireceipt()?"是":"否"%></td>
  </tr>
  <tr>
    <td colspan="2" bgcolor="#A7CADE">&nbsp;内容
    <table align="center" width="90%" style="background-color:#ffffff">
    <tr><td><%=info.icontent()%></td></tr>
    </table>
    <br>
    </td>
  </tr>
</table>
<%if(info.ireceipt()){%>
<br>
<table width="50%">
	<%
	   if(list != null && !list.isEmpty()){
	      for(int i=0;i<list.size();i++){
	          Map temp = (Map)list.get(i);
	%>
	 <tr>
	   <td bgcolor="#A7CADE">&nbsp;浏览人&nbsp;</td>
	   <td><%=temp.get("USER_NAME")%>&nbsp;<%=temp.get("GROUP_NAME")%></td>
	   <td bgcolor="#A7CADE">&nbsp;浏览时间&nbsp;</td>
	   <td>&nbsp;<%=DateTrimmer.getYMDHMS_LBL((String)temp.get("RTIME"))%></td>
	 </tr>  
	<%
	      }
	   }
	%>
</table>
<%}%>	
</form>
</body>
</html>